package com.lagou.distribution.service.impl;

import com.lagou.distribution.dao.UserRepository;
import com.lagou.distribution.pojo.User;
import com.lagou.distribution.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserRepository repository;

    @Override
    public User login(String name, String pwd) {
        return repository.findByNameAndPassword(name,pwd);
    }
}
